package org.baojie.server.refactor;

/**
 * @author baojie
 * @desc 功能描述
 * @date 2022/6/16 上午10:44
 */
public enum SQLErrorType {

    NO_ERROR("empty","无异常",0),
    NO_PRIMARY("primary","缺少主键",1),
    NO_COMMENT("comment","缺少字段备注信息",2),
    NO_WHERE("where","update语句缺少where条件",3),
    IN_HUKING("huking","表可能已经接入虎鲸",4);

    // 名称
    private final String name;
    // 描述
    private final String desc;
    // 标号
    private final int code;

    SQLErrorType(String name, String desc, int code) {
        this.name = name;
        this.desc = desc;
        this.code = code;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return desc;
    }

    public int getCode() {
        return code;
    }

    @Override
    public String toString() {
        return "SQLErrorType{" +
                "name='" + name + '\'' +
                ", desc='" + desc + '\'' +
                ", code=" + code +
                '}';
    }

}
